import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Window 2.0
import QtQuick.Dialogs 1.0
import QtQuick.Controls.Styles 1.0



Item {

    id: featurePage

    property int index
    property ListModel model: ListModel {}

    Column
    {
        anchors.fill: parent
        anchors.topMargin: 6
        anchors.leftMargin: 6
        spacing: 12

        Repeater {
            id: featureRepeater
            model: featurePage.model
            delegate: Column {
                TitleText {
                    id: titleText
                    color: "white"

                    text: name
                }

                Repeater {
                    id: detailRepeater
                    model: (index == 0) ? hitDiceList : (index == 1) ? skillPointsList : bonusList
                    delegate: Text {
                        color: "white"
                        text: name
                    }
                }

            }
        }
    }


//    ListView {
//        anchors.top: titleText.bottom
//        anchors.left: parent.left
//        anchors.right: parent.right
//        anchors.bottom: parent.bottom

//        model: featurePage.model
//        delegate: Text { text: name; color: "white" }
//    }



}
